package com.example.testcomposeproject.route

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.example.testcomposeproject.pages.testComposeCount.TestClickLotScreen
import com.example.testcomposeproject.pages.testComposeCount.TestComposeCountScreen
import com.example.testcomposeproject.pages.testRefresh.AScreen
import com.example.testcomposeproject.pages.testRefresh.BScreen
import com.example.testcomposeproject.pages.testRefresh.solve.ASolveScreen
import com.example.testcomposeproject.pages.testRefresh.solve.BSolveScreen

/**
 * @author: hemin
 * @date: 2024/7/22
 * @Desc:
 */

@Composable
fun AppNavHost(
    navController: NavHostController, modifier: Modifier) {

    val startDestination= DestASolveScreen.route
    NavHost(
        navController = navController,
        startDestination = startDestination,
        modifier = modifier
    ) {



        //ASolveCompose
        composable(
            route = DestASolveScreen.route,
        ) { navBackStackEntry ->
            ASolveScreen (modifier = modifier, clickBack = {
                navController.popBackStack()
            }, clickNext = {

                navController.navigate(DestBSolveScreen.route)
            })
        }

        //BSolveCompose
        composable(
            route = DestBSolveScreen.route,
        ) { navBackStackEntry ->
            BSolveScreen (modifier = modifier, clickBack = {
                navController.popBackStack()
            }, clickNext = {

            })
        }
        //ACompose
        composable(
            route = DestAScreen.route,
        ) { navBackStackEntry ->
            AScreen (modifier = modifier, clickBack = {
                navController.popBackStack()
            }, clickNext = {

                navController.navigate(DestBScreen.route)
            })
        }

        //BCompose
        composable(
            route = DestBScreen.route,
        ) { navBackStackEntry ->
            BScreen (modifier = modifier, clickBack = {
                navController.popBackStack()
            }, clickNext = {

            })
        }





        composable(
            route = DestClickLotScreen.route,
        ) { navBackStackEntry ->
            TestClickLotScreen(modifier = modifier, clickBack = {
                navController.popBackStack()
            }, clickNext = {

              navController.navigate(DestComposeCountScreen.route)
            })
        }








        composable(
            route = DestComposeCountScreen.route,
        ) { navBackStackEntry ->
            TestComposeCountScreen(modifier = modifier, clickBack = {
                navController.popBackStack()
            }, clickNext = {


            })
        }
    }
}